require('../comm/css/normalize.css'); // 下载的重置样式
require('../comm/css/reset.css') // 自己在normalize基础上添加的重置样式
require('../comm/css/property.css') // 面向属性的css

require('../css/ad.less')
const Dom = require('../comm/js/dom'); // dom.js

// 调用ready方法
document.ready(function () {

    // 获取dom
    const timer = Dom.getById('#timer'); // 倒计时
    const jump = Dom.getById('#jump'); // 跳转按钮

    jump.addEventListener('click',function(){
        location.href='./login.html'
    })

    let num = 5;
    timer.textContent = num;
    let time = setInterval(function(){
        console.log(666);
        num--;
        // 判断
        if (num === 0) {
            location.href = './login.html'; // 跳转
            clearInterval(time); // 清除定时器
            return;
        }
        timer.textContent = num; // 渲染
    },1000)

})